---
--类名: HistoryController.lua
--创建日期: 2018-4-20
--创建人: 宋建邦
--功能描述: 光辉历程控制器
--修改内容:


local HistoryView = import(".HistoryView")

local HistoryController = class("HistoryController",function()
	return display.newNode()
end)

function HistoryController:ctor(achType,labelType)
	self.mHistoryView = HistoryView.new(achType,labelType)
	self:addChild(self.mHistoryView)

	self:addListeners()

	self:setNodeEventEnabled(true)

	-- dump(HistoryManager:transTime(90991102))
end

function HistoryController:addListeners()
	-- self.mHistoryView:addEventListener("ACH_UI_CLOSE", handler(self, HistoryController.closeUI)) 
	-- self.mAchView:addEventListener("ACH_TAKE_AWARD", handler(self, Achcontroller.takeAchievementAward)) 
	-- self.mAchView:addEventListener("ACH_REFRESH_TJ", handler(self, Achcontroller.refreshTongji)) 
	-- self.mAchView:addEventListener("ACH_OPEN_MEDAL", handler(self, Achcontroller.openMedal)) 
	-- self.badgeHandler = UD.badge:onChanged(function(id,num)
    -- 	self.mAchView:refreshNewPoint()
    -- end)
end

function HistoryController:onEnter()

end

function HistoryController:onExit()
	-- UD.badge:unChanged(self.badgeHandler)
end

function HistoryController:closeUI()
	-- UIHandler:handleMessage({id = Constant.FUNC_TYPE_CJ,mode = "close"})
end

function HistoryController:getViewType()
	return app.mvc.VIEWTYPE_BLUR
end

return HistoryController